package com.yzp.service.impl;

import com.yzp.dao.TestMasterDao;
import com.yzp.dao.TestSlaveDao;
import com.yzp.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author yanzhouping
 */
@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private TestMasterDao testMasterDao;
    @Autowired
    private TestSlaveDao testSlaveDao;

    /**
     * 更新
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public String update() {
        testMasterDao.master();
        testSlaveDao.slave();
        int a=1/0;
        //System.out.println(a);
        return null;
    }


}

